Skip to content

[ITEP-83027] Controller with Analytics only mode#884

Open
dmytroye wants to merge 160 commits intomainfrom
ITEP-83027/controller-analytics-only-mode
Open

[ITEP-83027] Controller with Analytics only mode#884
dmytroye wants to merge 160 commits intomainfrom
ITEP-83027/controller-analytics-only-mode

Conversation

@dmytroye
Copy link
Member

@dmytroye dmytroye commented Jan 15, 2026

📝 Description

This PR introduces an analytics-only mode for the Controller service, allowing it to consume tracked objects from a separate Tracker service via MQTT rather than performing tracking internally.

Changes:

  • Added --analytics-only command-line flag and CONTROLLER_ENABLE_ANALYTICS_ONLY environment variable (defaults to false)
  • Modified Controller to skip tracker initialization when analytics-only mode is enabled
  • Implemented tracked object caching and deserialization from MQTT messages
  • Optimized early-exit checks in camera/scene data processing for better performance
  • Added Docker Compose and Kubernetes/Helm deployment support

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests
  • 🚂 CI

🧪 Testing Scenarios

Describe how the changes were tested and how reviewers can test them too:

  • ✅ Tested manually
  • 🤖 Ran automated end-to-end tests

✅ Checklist

Before submitting the PR, ensure the following:

  • 🔍 PR title is clear and descriptive
  • 📝 For internal contributors: If applicable, include the JIRA ticket number (e.g., ITEP-123456) in the PR title. Do not include full URLs
  • 💬 I have commented my code, especially in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ✅ I have added tests that prove my fix is effective or my feature works

dmytroye and others added 30 commits December 8, 2025 14:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sarthakdeva-intel
Copy link
Contributor

Discussed with @dmytroye ,
External tracker service that subscribes to DATA_CAMERA and publishes tracks in a scene on DATA_SCENE should also subscribe to DATA_EXTERNAL. However if this is not in the current scope of external tracker service , then I suggest completely disabling scene hierarchy in controller's analytics only mode.

Points to consider:

  • Controller in analytics only mode can not fuse tracks from child with tracks in the scene. However it can republish events that are rightly transformed. But they don't hold any significance without tracks.
  • In the else part of subscriptions in local child scene and remote child scene, subscribing to DATA_SCENE will yield in republishing the same tracks got from the child scene under the same topic. Redundant.

@sarthakdeva-intel
Copy link
Contributor

sarthakdeva-intel commented Jan 30, 2026

@dmytroye Refer to https://github.com/open-edge-platform/scenescape/blob/main/docs/user-guide/building-a-scene/how-to-use-sensor-types.md#steps-to-integrate-environmental-and-attribute-sensors. Please check if the behavior is not changed for these sensor types.
I believe attribute persistence is an attribute of moving object which is associated by the tracker. Please verify.

Copy link
Contributor

@sarthakdeva-intel sarthakdeva-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM!

@dmytroye
Copy link
Member Author

@dmytroye Refer to https://github.com/open-edge-platform/scenescape/blob/main/docs/user-guide/building-a-scene/how-to-use-sensor-types.md#steps-to-integrate-environmental-and-attribute-sensors. Please check if the behavior is not changed for these sensor types. I believe attribute persistence is an attribute of moving object which is associated by the tracker. Please verify.

In the default mode data from sensors also visible on data/scene topic. But in Analytics only mode is not visible due to all data is generated from K6 script (mimics separate tracker service). Even if sensor data will be published it will be immediately overwritten by new message from tracker (or k6 in case of simulation). Events are publishing correctly in both modes.

@dmytroye dmytroye requested a review from tdorauintc February 4, 2026 14:23
@dmytroye
Copy link
Member Author

dmytroye commented Feb 4, 2026

Discussed with @dmytroye , External tracker service that subscribes to DATA_CAMERA and publishes tracks in a scene on DATA_SCENE should also subscribe to DATA_EXTERNAL. However if this is not in the current scope of external tracker service , then I suggest completely disabling scene hierarchy in controller's analytics only mode.

Points to consider:

  • Controller in analytics only mode can not fuse tracks from child with tracks in the scene. However it can republish events that are rightly transformed. But they don't hold any significance without tracks.
  • In the else part of subscriptions in local child scene and remote child scene, subscribing to DATA_SCENE will yield in republishing the same tracks got from the child scene under the same topic. Redundant.

@sarthakdeva-intel Scene hierarchy in controller's analytics only mode disabled for objects and events republish.

@dmytroye dmytroye enabled auto-merge (squash) February 4, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants